package com.zhonghui.mes.service.impl;

import java.util.List;

import com.zhonghui.mes.domain.MesFactoryAll;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhonghui.mes.mapper.MesFactoryMapper;
import com.zhonghui.mes.domain.MesFactory;
import com.zhonghui.mes.service.IMesFactoryService;

/**
 * 制造执行MES-工厂建模Service业务层处理
 *
 * @author zhonghui
 * @date 2024-11-27
 */
@Service
public class MesFactoryServiceImpl implements IMesFactoryService
{
    @Autowired
    private MesFactoryMapper mesFactoryMapper;

    /**
     * 查询制造执行MES-工厂建模
     *
     * @param id 制造执行MES-工厂建模主键
     * @return 制造执行MES-工厂建模
     */
    @Override
    public MesFactoryAll selectMesFactoryById(Long id)
    {
        return mesFactoryMapper.selectMesFactoryById(id);
    }

    /**
     * 查询制造执行MES-工厂建模列表
     *
     * @param mesFactory 制造执行MES-工厂建模
     * @return 制造执行MES-工厂建模
     */
    @Override
    public List<MesFactory> selectMesFactoryList(MesFactory mesFactory)
    {
        return mesFactoryMapper.selectMesFactoryList(mesFactory);
    }

    /**
     * 新增制造执行MES-工厂建模
     *
     * @param mesFactory 制造执行MES-工厂建模
     * @return 结果
     */
    @Override
    public int insertMesFactory(MesFactory mesFactory)
    {
        return mesFactoryMapper.insertMesFactory(mesFactory);
    }

    /**
     * 修改制造执行MES-工厂建模
     *
     * @param mesFactory 制造执行MES-工厂建模
     * @return 结果
     */
    @Override
    public int updateMesFactory(MesFactory mesFactory)
    {
        return mesFactoryMapper.updateMesFactory(mesFactory);
    }

    /**
     * 批量删除制造执行MES-工厂建模
     *
     * @param ids 需要删除的制造执行MES-工厂建模主键
     * @return 结果
     */
    @Override
    public int deleteMesFactoryByIds(String[] ids)
    {
        return mesFactoryMapper.deleteMesFactoryByIds(ids);
    }

    /**
     * 删除制造执行MES-工厂建模信息
     *
     * @param id 制造执行MES-工厂建模主键
     * @return 结果
     */
    @Override
    public int deleteMesFactoryById(String id)
    {
        return mesFactoryMapper.deleteMesFactoryById(id);
    }
}
